
package nc.itf.hrpbctp.busictrl.busictrl;

import java.util.List;
import java.util.Map;
import java.util.Set;

import nc.vo.hrpbctp.busictrl.AggBusiCtrlVO;
import nc.vo.hrpbctp.busictrl.BusiCtrlVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.SuperVO;

public interface  IBusiCtrlVOService{

	/**
	 * 根据业务控制维度查询其启用的控制维度字段名
	 * @return
	 * @throws BusinessException
	 */
	public Map<String,String[]> getDimShowFieldsAction(String pk_busictrldim) throws BusinessException;

	/**
	 * 业务控制的AGGVO查询操作
	 * 根据主键条件查询Agg数组
	 * @param pk主键
	 * @return 结果数组
	 */
	public AggBusiCtrlVO[] listAggBusiCtrlVOByPk(String... pks) throws BusinessException;

	/**
	 * 业务控制的AGGVO查询操作
	 * 根据主键条件查询Agg数组
	 * @param pk主键
	 * @return 结果数组
	 */
	public AggBusiCtrlVO[] listAggBusiCtrlVOByPk(boolean blazyLoad,String... pks) throws BusinessException;

	/**
	 * 业务控制的AGGVO查询操作
	 * 根据主键条件查询Agg对象
	 * @param pk 主键
	 * @return 结果对象
	 */
	public  AggBusiCtrlVO findAggBusiCtrlVOByPk(String pk) throws BusinessException;

	/**
	 * 业务控制的AGGVO查询操作
	 * 根据条件字符串查询Agg数组
	 * @param condition 主键
	 * @return 结果数组
	 */
	public  AggBusiCtrlVO[] listAggBusiCtrlVOByCondition(String condition) throws BusinessException;

	/**
	 * 业务控制的AGGVO查询操作
	 * 根据条件字符串查询Agg数组
	 * @param condition 条件
	 * @param orderPath 排序集合
	 * @return 结果数组
	 */
	public  AggBusiCtrlVO[] listAggBusiCtrlVOByCondition(String condition,String[] orderPath) throws BusinessException;

	/**
	 * 业务控制的主表VO查询操作
	 * 根据主键条件查询Agg数组
	 * @param pk主键
	 * @return 结果数组
	 */
	public BusiCtrlVO[] listBusiCtrlVOByPk(String...pks) throws BusinessException;

	/**
	 * 业务控制的主表VO查询操作
	 * 根据主键条件查询Agg对象
	 * @param pk 主键
	 * @return 结果对象
	 */
	public  BusiCtrlVO findBusiCtrlVOByPk(String pk) throws BusinessException;

	/**
	 * 业务控制的主表VO查询操作
	 * 根据条件字符串查询Agg数组
	 * @param condition 主键
	 * @return 结果数组
	 */
	public  BusiCtrlVO[] listBusiCtrlVOByCondition(String condition) throws BusinessException;
	/**
	 * 业务控制的主表VO查询操作
	 * 根据条件字符串查询Agg数组
	 * @param condition 主键
	 * @return 结果数组
	 */
	public  BusiCtrlVO[] listBusiCtrlVOByCondition(String condition,String[] orderPath) throws BusinessException;

	/**
	 * 业务控制的主表pk查询操作
	 * 根据条件字符串查询pk数组数组
	 * @param condition 查询方案+
	 * @return 结果数组
	 */
	public String[] listBusiCtrlVOPkByCond(String condition) throws BusinessException;

	public String[] listBusiCtrlVOPkBySql(String sql) throws BusinessException;

	/**
	 * 业务控制的主表pk查询操作
	 * 根据条件字符串查询pk数组数组
	 * @param condition 查询方案+
	 * @return 结果数组
	 */
	public String[] listBusiCtrlVOPkByCond(String condition,String[] orderPath) throws BusinessException;
	/**
	 * 给主实体vo设置默认值
	 * @param vo
	 */
	public void initDefaultData(BusiCtrlVO vo);


	/**
	 * 预新增操作业务控制数据
	 * @param userJson  新增时需要的扩展参数对象
	 */
	public AggBusiCtrlVO preAddAggBusiCtrlVO(Map<String,Object> userJson) throws BusinessException;

	public AggBusiCtrlVO preAddAggBusiCtrlVO(AggBusiCtrlVO vo,Map<String,Object> userJson) throws BusinessException;
	/**
	 * 预编辑操作业务控制数据
	 * @param userJson  新增时需要的扩展参数对象
	 */
	public AggBusiCtrlVO preEditAggBusiCtrlVO(String pk) throws BusinessException;

	/**
	 * 复制操作业务控制数据
	 *
	 */
	public AggBusiCtrlVO copyAggBusiCtrlVO(String pk) throws BusinessException;
	/**
	 * 保存操作业务控制数据
	 * @param vos 保存对象
	 * @return @
	 */
	public AggBusiCtrlVO[] saveAggBusiCtrlVO(AggBusiCtrlVO vo) throws BusinessException;

	public AggBusiCtrlVO[] saveAggBusiCtrlVO(AggBusiCtrlVO[] vos) throws BusinessException;


	/**
	 * 删除操作业务控制数据
	 * @param vos 删除对象
	 * @return @
	 */
	public AggBusiCtrlVO[] deleteAggBusiCtrlVOs(Map<String,String> tsMap) throws BusinessException;

	/**
	 * 加载树类型数据业务控制
	 * @param vos 对象
	 * @return @
	 */
	public <T> T[] loadTreeData(Class<T> clazz,Map<String,Object> userJson) throws BusinessException;

	/**
	 * 根据主表主键查询子表pks
	 * @param childClazz 子表class
	 * @param parentId 主表主键
	 * @return 子表pks
	 * @throws BusinessException
	 */
	String[] queryChildPksByParentId(Class childClazz, String parentId) throws BusinessException;

	/**
	 * 根据子表主键查询子表数据
	 * @param childClazz 子表class
	 * @param pks 子表
	 * @return 子表vos
	 * @throws BusinessException
	 */
	SuperVO[] queryChildVOByPks(Class childClazz, String[] pks) throws BusinessException;

	/**
	 * 根据条件查询子表pks
	 * @param childClazz
	 * @param condition
	 * @return
	 * @throws BusinessException
	 */
	SuperVO[] queryChildPksByCondition(Class childClazz, String condition) throws BusinessException;

	/**
	 * 查询对应节点链接
	 * @param id
	 * @param transtype
	 * @return
	 */
	Map<String,String> queryBillLinkInfo(String id, String transtype) throws BusinessException, ClassNotFoundException;

	//同步预算到友费控
	public void syncBudgetToFeeCTRL(List pks) throws BusinessException;

	//从友费控获取执行数
	public void syncExcToHrp(List pks) throws BusinessException;


	public Map<String, Map<String, Map<String, String>>> docBatchTranslate(Map<String, Set<String>> nccDocMap) throws BusinessException;

	/**
	 *	档案批量启用
	 *
	 * @param pk_busictrls 业务控制信息主键
	 * @return AggBusiCtrlVO
	 * @throws BusinessException
	 */
	public AggBusiCtrlVO[] batchCtrlRuleEnable(String[] pk_busictrls) throws BusinessException;

	/**
	 *	档案批量停用
	 *
	 * @param pk_busictrls 业务控制信息主键
	 * @return AggBusiCtrlVO
	 * @throws BusinessException
	 */
	public AggBusiCtrlVO[] batchCtrlRuleDisable(String[] pk_busictrls) throws BusinessException;

	/**
	 * 查询外部接口单节点链接主键
	 * @param code
	 * @return
	 */
	Map<String,String> queryBillLinkExtInfo(String code) throws BusinessException, ClassNotFoundException;

}